<?php


namespace App\Modules\Seller\Http\Controllers;


use Illuminate\Http\Request;

class IndexController extends BaseController
{
    /**
     * 构造函数
     * @param Request $request
     * @since 2020/8/27
     * IndexController constructor.
     * @author 牧羊人
     */
    public function __construct(Request $request)
    {
        parent::__construct($request);
    }

    /**
     * 系统主页
     * @return
     * @since 2020/8/30
     * @author 牧羊人
     */
    public function index()
    {
        $adminRomService = new AdminRomService();
        $menuList = $adminRomService->getPermissionList($this->adminId);
        return view('seller::index', ['menuList' => $menuList]);
    }
    /**
     * 欢迎页
     * @return view
     * @since 2020/8/30
     * @author 牧羊人
     */
    public function main()
    {
        return view('seller::main');
    }
    /**
     * 更新个人信息
     * @return view|array
     * @since 2020/9/2
     * @author 牧羊人
     */
    public function userInfo()
    {
//        $adminInfo = $this->model->getInfo($this->adminId);
        $adminInfo = [
            'avatar_url'=>'',
            'realname'=>'',
            ''=>'',
            ''=>'',
        ];
        return view("userinfo", ['adminInfo' =>$adminInfo]);
    }

    /**
     * 获取服务器状态
     *
     * @return \Illuminate\Http\JsonResponse
     */
    public function getServerStatus()
    {
        return $this->successJson([]);
    }

}